home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
LIBRARY
/
PAS_0793
/
NAPLPS.INF
< prev
next >
Wrap
Text File
|
1993-07-15
|
7KB
|
223 lines
─ Fido Pascal Conference ────────────────────────────────────────────── PASCAL ─
Msg : 214 of 228
From : Warren Zatwarniski 1:140/111.0 14 Jul 93 22:45
To : All
Subj : (1/2) NAPLPS - INFO
────────────────────────────────────────────────────────────────────────────────
Documentation (kind of) on NAP_DRAW.PAS
Hopefully this will provide enough information that you will be able to use the
NAP_DRAW.PAS unit, and also make any needed modifications to the program.
Function N_Point (Xcoord, Ycoord : Integer) : String;
First when doing a point, the (x,y) coordinates are combined to form one byte.
Each one uses 3 bits of a byte.
+-+-+-+-+-+-+-+-+ If using 7-but graphics the x is a 0,
|x|1| | | | | | | and in 8-bit graphics the x is a 1.
+-+-+-+-+-+-+-+-+ My unit is for 8 bit NAPLPS graphics only.
^^^^^ ^^^^^
X Y
And each (x,y) coordinate can have upto 8 bytes linked together. Each byte
divided into 3 bits for the x, and 3 for the y. The NAPLPS screen is normally
divided in a "grid" of 255x255. To pick one of the 255 possible coordinates in
each directon, I only use 3 bytes. The first bit for the x and y value is for a
positive or negative co-ordinate.
Function N_SelectColor (Color : Byte) : String;
For the select color command, you can use 1 to 4 bytes. Each containing 6 bits
of information.
MSB
v
+-+-+-+-+-+-+-+-+
|x|1| | | | | | |
+-+-+-+-+-+-+-+-+
^LSB
With my function you can specify up to 256 colors. With one byte you can
specify up to 64 colors, and to use more you have to change the value of LSO to
2 so the procedures will know that you need 2 bytes. You also need to change
the value of Xcolor to the number of colors you will use. This is so the most
significant bit (MSB) will be calculate right.
Function N_SetColor(Green, Red, Blue : Real) : String;
+-+-+-+-+-+-+-+-+ You can use 1-8 bytes for color.
|x|1|G|R|B|G|R|B|
+-+-+-+-+-+-+-+-+
To define a color, you specify the amounts of green, red and blue you want. A
byte contains 2 bits of each color. With my function, decimal values are
allowed and you can specify color values from 0 to 7.
Function N_Domain : String;
+-+-+-+-+-+-+-+-+
|x|1|D|M|M|M|S|S| - See below
+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+
|x|1| | | | | | | - Logical Pel Size
+-+-+-+-+-+-+-+-+
^^^^^ ^^^^^
X Y
D - Dimensions.
0 is 2-dimensional, 1 is three dimensional.
My functions only allow for 2 dimensions. So this must be
set to 0.
MMM - Length of Multivalue Operands.
000 = 1
001 = 2
010 = 3 (default)
011 = 4
100 = 5
101 = 6
110 = 7
111 = 8
SS - Length of Single-value Operands
00 = 1 (default)
01 = 2
10 = 3
11 = 4
The domain is used to control the size of data operands. It is made up of a
fixed format operand followed by a multibyte operand. The multivalue operand is
used to control the size of the logical drawing point. To change any of these
valued you must change the following variable and make a call to N_domain.
LMO - Default = 3
LSO - Default = 1
PelSize.X - Default = 1
PelSize.Y - Default = 1
... Press [ESC] to detonate or any other key to explode .
---
Blue Wave/QWK v2.11
--- TurBoard v1.20
* Origin: NAPLPS Grafx * LCD/Herc/CGA/EGA/VGA & MORE! 9600 HST (1:140/111)
─ Fido Pascal Conference ────────────────────────────────────────────── PASCAL ─
Msg : 215 of 228
From : Warren Zatwarniski 1:140/111.0 14 Jul 93 22:45
To : All
Subj : (2/2) NAPLPS - INFO
────────────────────────────────────────────────────────────────────────────────
Function N_Reset (Color, Mode : Byte; D, T, F, U, X, M, R : Boolean) : String;
+-+-+-+-+-+-+-+-+
|x|1|B|B|B|C|C|D|
+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+
|x|1|R|M|X|U|F|T|
+-+-+-+-+-+-+-+-+
The Reset is made up of 2 bytes.
BBB - Color
000 = No action
001 = Physical display area to nominal black
010 = Physical display area to current drawing color
011 = Border area to nominal black
100 = Border area to current drawing color
101 = Physical display area and border area to current drawing color
110 = Physical display area to current drawing color, and border area to
nominal black
111 = Physical display area and border area to nominal black
CCC - Color mode
00 = No action
01 = Select color mode 0, set color map to default colors, and set the
in use drawing color to white.
10 = Select color mode 1 and set color map to default colors.
11 = Select color mode 1, set color map to default color, and set the
in-use drawing color to white.
D - Domain
T - Text
F - Blink
U - Unprotected fields
X - Texture
M - Macro
R - DRCS
This function is used to clear the screen and initialize the attributes. The D,
T, F, U, X, M, R, are all set to TRUE if you want to reset them.
Function N_Text (XSize,YSize : Byte) : String;
This function is used to set up text size, rotation, path, spacing...etc. I
have outlined what each of the bits mean bellow.
+-+-+-+-+-+-+-+-+
|x|1|I|I|P|P|R|R|
+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+
|x|1|C|C|M|M|S|S|
+-+-+-+-+-+-+-+-+
+-+-+-+-+-+-+-+-+
|x|1| | | | | | | - Text size
+-+-+-+-+-+-+-+-+
^^^^^ ^^^^^
X Y
II - Intercharacter Spacing
00 = 1 (default value)
01 = 1.25
10 = 1.5
11 = Proportional spacing
PP - Character Path
00 - Right
01 - Left
10 - Up
11 - Down
RR - Rotation
00 = 0 (default)
01 = 90
10 = 180
11 = 270
CC - Cursor Style
00 = Underscore (default)
01 = Block
10 = Cross-hair
11 = Custom
MM - Move atributes
00 = Move together (default)
01 = Cursor leads
10 = Drawing point leads
11 = Moving independently
SS - Interrow Spacing
00 = 1 (default)
01 = 1.25
10 = 1.5
11 = 2
Decimal text sizes should also be allowed. My function only uses integers
however.
... To me, "due tomorrow" means just that: Do tomorrow.
---
Blue Wave/QWK v2.11
--- TurBoard v1.20
* Origin: NAPLPS Grafx * LCD/Herc/CGA/EGA/VGA & MORE! 9600 HST (1:140/111)